package yxw;

import org.apache.hadoop.hive.ql.exec.Description;
import org.apache.hadoop.hive.ql.exec.UDF;

@Description(name = "gendertext",value = " create temporary function _FUNC_ as 'com/qdu/hive/test4/gendertext.java';\nselect _FUNC_('female');")
public class gendertext extends UDF {
    public String evaluate(int eval) {
        if (eval >= 4) {
            return "推荐";
        } else if (eval >= 3) {
            return "可用";
        } else {
            return "不推荐";
        }
    }
}
